package com.mccrea.pattern.prototype.deep;

/**
 * @author mccrea
 * @version 1.0
 * @description: 深拷贝测试
 * @date 2021/5/8 0:01
 */
public class Client {
    public static void main(String[] args) {
        DeepProtoType deepProtoType = new DeepProtoType();
        deepProtoType.setName("一二三");
        deepProtoType.setDeepCloneableTarget(new DeepCloneableTarget("四五六", "七八九"));
        DeepProtoType deepProtoType1 = (DeepProtoType) deepProtoType.deepClone();
        System.out.println(deepProtoType.getDeepCloneableTarget().hashCode());
        System.out.println(deepProtoType1.getDeepCloneableTarget().hashCode());
    }
}
